package com.andox.fn.inf.rpc.rest.util;

import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

import com.andox.fn.inf.rpc.rest.common.DefaultValueConcurrentHashMap;

public class BeanNameUtil {
	private static Map<Class<?>, AtomicInteger> x = new DefaultValueConcurrentHashMap<>(() -> new AtomicInteger(0));
	
	public static String next(Class<?> clazz) {
		return String.format("%s-%d", clazz.getName(), x.get(clazz).incrementAndGet());
	}
}
